/*
 * @Author: wuyuanhong wuyuanhong@szhbzc.com
 * @Date: 2024-06-13 10:25:57
 * @LastEditors: wuyuanhong wuyuanhong@szhbzc.com
 * @LastEditTime: 2024-09-12 09:48:16
 * @FilePath: \xiamenAgency\src\cuview-ui\index.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import cusDrawer from './components/cus-drawer/cus-drawer'
import cusCascadeDate from './components/cus-cascadeDate/cus-cascadeDate'
import cusDatePick from './components/cus-datePick/cus-datePick'
import cusAutoComplete from './components/cus-autoComplete/cus-autoComplete'
import cusSpin from './components/cus-spin/cus-spin'
import cusSearch from './components/cus-search/cus-search'
import cusSearchItem from './components/cus-search-item/cus-search-item'
import cusModal from './components/cus-modal/cus-modal'
import cusPage from './components/cus-page/cus-page'
import cusUpload from './components/cus-upload/cus-upload'
import cusUploadIMG from './components/cus-uploadIMG/cus-uploadIMG'
import cusUploadCrop from './components/cus-uploadCrop/cus-uploadCrop'
import cusUploadModal from './components/cus-uploadModal/cus-uploadModal'
import cusFooter from './components/cus-footer/cus-footer'
import cusButton from './components/cus-button/cus-button'
import cusCard from './components/cus-card/cus-card'
import cusProgress from './components/cus-progress/cus-progress'
import cusTabs from './components/cus-tabs/cus-tabs'
import cusTag from './components/cus-tag/cus-tag'
import cusTable from './components/cus-table/cus-table'
import cusAllcard from './components/cus-allcard/cus-allcard'
import echartModal from './components/echart-modal/echart-modal'
import previewImage from './libs/function/previewImage'
import dialog from "./libs/function/dialog";
import notice from './libs/function/notice'
import dealTree from './libs/function/dealTree'
import deepClone from './libs/function/deepClone'
import getPermission from './libs/function/getPermission'
import debounce from "./libs/function/debounce";
import throttle from "./libs/function/throttle";
import navigatorTo from "./libs/function/navigatorTo";
import test from "./libs/function/test";
import simulationClick from './libs/function/simulationClick'
import {showLoading, hideLoading} from './libs/function/loading'

let components = {
  cusCascadeDate,
  cusDatePick,
  cusAutoComplete,
  cusProgress,
  cusModal,
  cusCard,
  cusUpload,
  cusUploadIMG,
  cusUploadCrop,
  cusUploadModal,
  cusSearch,
  cusSearchItem,
  cusButton,
  cusFooter,
  cusSpin,
  cusPage,
  cusTabs,
  cusTag,
  cusAllcard,
  echartModal,
  cusTable,
  cusDrawer,
}

let $cu = {
  previewImage,
  dialog,
  notice,
  dealTree,
  deepClone,
  debounce,
  throttle,
  getPermission,
  test,
  showLoading,
  hideLoading,
  navigatorTo,
  simulationClick,
}


const install = Vue => {

  Object.keys(components).forEach(val => {
    Vue.component(val, components[val]);
  })

  Vue.prototype.$cu = $cu;
  Vue.prototype.$cu.eventBus = new Vue();
}

export default {
  install
}
